package com.hc.model.code04.test7_1;

/**
 * @version v1.0
 * @ClassName: ConcreteUser
 * @Description: 具体的同事类
 * @Author: HC
 */
public class ConcreteUser extends User {

    public ConcreteUser(String name, ChatMediator mediator) {
        super(name, mediator);
    }

    @Override
    public void sendMessage(String message) {
        System.out.println(super.name + "发送的内容是：" + message);
        super.mediator.sendMessage(message, this);
    }

    @Override
    public void receiveMessage(String message) {
        System.out.println(super.name + "接收到的消息是：" + message);
    }
}
